<template>
	<el-form-item :label="$t('designer.setting.valueField')" v-if="!noLabelSetting">
		<el-input type="text" v-model="thisOptionModel.valueField"></el-input>
	</el-form-item>
</template>

<script>

export default {
	name: "value-field-editor",
	mixins: [],
	props: {
		designer: Object,
		selectedWidget: Object,
		optionModel: Object,
	},
	computed: {
		noLabelSetting() {
			return (this.selectedWidget.type === 'static-text') || (this.selectedWidget.type === 'html-text')
			//|| (this.selectedWidget.type === 'divider')
		},
	},
	data() {
		return {
			thisOptionModel: this.optionModel
		}
	},
	watch: {
		optionModel: {
			handler(val) {
				if (val) {
					this.thisOptionModel = val
				}
			}
		},
	},
}
</script>

<style lang="scss" scoped>

</style>
